package com.rickpan.dto.contacts;

import java.util.List;

/**
 * 联系人列表响应DTO
 */
public class ContactsListResponse {

    private List<FriendResponse> friends;
    private List<String> groups;
    private Long totalCount;
    private Long onlineCount;

    // 构造函数
    public ContactsListResponse() {}

    public ContactsListResponse(List<FriendResponse> friends, List<String> groups, Long totalCount, Long onlineCount) {
        this.friends = friends;
        this.groups = groups;
        this.totalCount = totalCount;
        this.onlineCount = onlineCount;
    }

    // 静态工厂方法
    public static ContactsListResponse of(List<FriendResponse> friends, List<String> groups, Long totalCount, Long onlineCount) {
        return new ContactsListResponse(friends, groups, totalCount, onlineCount);
    }

    // Getter和Setter方法
    public List<FriendResponse> getFriends() {
        return friends;
    }

    public void setFriends(List<FriendResponse> friends) {
        this.friends = friends;
    }

    public List<String> getGroups() {
        return groups;
    }

    public void setGroups(List<String> groups) {
        this.groups = groups;
    }

    public Long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Long totalCount) {
        this.totalCount = totalCount;
    }

    public Long getOnlineCount() {
        return onlineCount;
    }

    public void setOnlineCount(Long onlineCount) {
        this.onlineCount = onlineCount;
    }

    @Override
    public String toString() {
        return "ContactsListResponse{" +
                "friends=" + friends +
                ", groups=" + groups +
                ", totalCount=" + totalCount +
                ", onlineCount=" + onlineCount +
                '}';
    }
}
